package com.list.arraylist;

import java.util.ArrayList;
import java.util.Iterator;

public class SimpleTwo {
public static void main(String[] args) {
	Student s1=new Student(1, "deepak", 34);
	Student s2=new Student(2, "amit", 35);
	Student s3=new Student(3, "javed", 64);
	ArrayList al=new ArrayList();
	al.add(s1);
	al.add(s2);
	al.add(s3);
	Iterator itr=al.iterator();
	while(itr.hasNext()){
		Student st=(Student)itr.next();
		System.out.println(st.roll+"\t"+st.name+"\t"+st.age);
	}
}
}
